Skip to content

New module: modkit/extractfull - #11285

Merged
SPPearce merged 5 commits into
nf-core:masterfrom
sahuno:add-modkit-extract-full
Sep 11, 2026
Merged

New module: modkit/extractfull#11285
SPPearce merged 5 commits into
nf-core:masterfrom
sahuno:add-modkit-extract-full

Conversation

@sahuno

@sahuno sahuno commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

PR checklist

  • This comment contains a description of changes (with reason).
  • Stub + real tests added.
  • New tool follows module conventions.
  • Versions broadcast via `topic: versions`.
  • Naming/parameter/I-O conventions followed.
  • Resource label set (`process_high`).
  • BioConda + BioContainers used.
  • `nf-core modules lint modkit/extract/full` — 49/0/0.
  • `nf-test test --profile conda` — 2/2 passed.

Summary

Adds a new nf-core module wrapping `modkit extract full`, which transforms the MM/ML tags in a modBAM into a tab-separated per-read-per-position probability table. Emits one row for every modified-base probability call in every read.

The module auto-detects `--bgzf` in `ext.args` and adjusts the output filename suffix accordingly (`.tsv` vs `.tsv.gz`), so users don't get a misleading extension when enabling compression.

Why

`modkit extract full` is the source of truth for read-level methylation probabilities and is essential for custom downstream filtering, phased methylation plots, and ML training on raw probability distributions. Paired with `modkit extract calls` (companion PR) which emits thresholded categorical calls.

Test data

Uses the existing `test.sorted.phased.bam` from nf-core/test-datasets (modules branch). No new test data required.

🤖 Generated with Claude Code

Add new nf-core module wrapping `modkit extract full`, which transforms
the MM/ML tags in a modBAM into a tab-separated per-read-per-position
probability table. Output can be BGZF-compressed via `--bgzf` in
`ext.args`. Useful for downstream custom filtering, plotting, and ML
training on read-level methylation probabilities.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@SPPearce

Copy link
Copy Markdown
Contributor

This needs to be called modkit/extractfull I think (can't be modkit/extract/full, as linked in @famosab's issue on tools)

@atrigila atrigila added the awaiting-changes will be closed after 30 days label Jul 2, 2026
@github-actions

Copy link
Copy Markdown

This PR has been tagged as awaiting-changes or awaiting-feedback by an @nf-core/modules contributor. Remove stale label or add a comment if it is still useful.

@github-actions github-actions Bot added the stale Stale label Aug 16, 2026
nf-core module names must be <tool> or <tool>/<subtool> (two levels max);
`modkit/extract/full` failed the `main_nf_module_granularity` lint check.

Renamed directory, process name (MODKIT_EXTRACTFULL), meta.yml name and
nf-test tags accordingly.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E7RSvpouxbMBdimYSwJ5ZP
@sahuno sahuno changed the title New module: modkit/extract/full New module: modkit/extractfull Sep 6, 2026
@sahuno

sahuno commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

@SPPearce agreed — renamed to modkit/extractfull.

This was the only remaining CI failure: nf-core lint reported
main_nf_module_granularity: Module not named as <tool> or <tool/subtool>
for the three-level modkit/extract/full path. Renamed the directory, the
process name (MODKIT_EXTRACTFULL), the meta.yml name: field and the
nf-test tags.

Sibling PR #11286 (modkit/extractcalls) has had the same rename applied.

@sahuno sahuno mentioned this pull request Sep 6, 2026
9 tasks
@sahuno sahuno removed the stale Stale label Sep 6, 2026
sahuno and others added 2 commits September 9, 2026 14:10
…o 0.6.4

Ports the review changes from nf-core#11286 to this module.

- Snapshot via `sanitizeOutput(process.out)` with `assert process.success`
  outside `assertAll`, so a tool failure fails fast rather than reporting a
  snapshot mismatch against empty output. Requires nft-utils 1.x, which is
  why master is merged in first.
- Drop the redundant exists/size asserts on the non-stub test; the snapshot
  already covers the tsv and an empty file is caught by the md5 lint check.
- Remove tests/nextflow.config (it only set an empty ext.args) and the
  `config` directive that loaded it.
- Bump ont-modkit 0.6.1 -> 0.6.4 (clears the `bioconda_latest` lint warning);
  container tag `0.6.4--h7f49ad2_0` verified on the Galaxy depot and quay.io.

Non-stub tsv md5 is unchanged at 8300986c98d1b67973439ced4e7f233c across both
the config removal and the version bump.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAsT7dzCcLSicJxFRWJozr
@sahuno
sahuno requested a review from SPPearce September 11, 2026 02:03
@sahuno

sahuno commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

Small update since the last round: rebased onto master, switched the tests to assert process.success + snapshot(sanitizeOutput(process.out)) to match the pattern agreed on #11286, regenerated the snapshots, and bumped the container to ont-modkit 0.6.4. CI is green and there are no open review threads — re-requesting review.

@SPPearce
SPPearce added this pull request to the merge queue Sep 11, 2026
Merged via the queue into nf-core:master with commit 2d92423 Sep 11, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-changes will be closed after 30 days

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants